home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 4 / Apprentice-Release4.iso / Languages / Caml Light 0.7 / Caml Light 0.7 source / src / linker / Makefile < prev    next >
Makefile  |  1995-07-05  |  3KB  |  103 lines

  1. # Makefile for the Caml Light linker.
  2.  
  3. CAMLCOMP = ::camlrun ::camlcomp
  4. CAMLLINK = ::camlrun ::camllink
  5. INCLUDES = -stdlib ::lib: -I ::compiler:
  6. COMPFLAGS = -W -O fast {INCLUDES}
  7. LINKFLAGS = -g {INCLUDES}
  8.  
  9. EXTERNOBJS = config.zo misc.zo interntl.zo opcodes.zo
  10.  
  11. OBJS = predef.zo prim_c.zo symtable.zo patch.zo tr_const.zo link.zo ∂
  12.     readword.zo version.zo main.zo
  13.  
  14. GENSOURCES = version.ml prim_c.ml predef.ml
  15.  
  16. all ƒ camllink
  17.  
  18. camllink ƒ {OBJS}
  19.     {CAMLLINK} {LINKFLAGS} -o camllink stdlib.zo {EXTERNOBJS} {OBJS}
  20.  
  21. clean ƒ
  22.     delete -i camllink {GENSOURCES} Makefile.BAK
  23.     delete -i ≈.z[io] ||echo
  24.  
  25. install ƒ
  26.     duplicate -y camllink "{LIBDIR}camllink"
  27.  
  28. prim_c.ml  ƒ ::runtime:primitives
  29.     Duplicate -y ::runtime:primitives prim_c.ml
  30.     Open prim_c.ml; Find • prim_c.ml
  31.     Replace -c ∞ /(?≈)®1/ '  "®1";' prim_c.ml
  32.     Replace \;\ '|];;' prim_c.ml
  33.     Find • prim_c.ml
  34.     Echo 'let primitives_table = [|' >prim_c.ml.§
  35.     Close -y prim_c.ml
  36.  
  37. predef.ml  ƒ ::runtime:globals.h ::runtime:fail.h
  38.     Echo '#open "const";;'∂n'let predef_variables = [' >predef.ml
  39.     Open predef.ml;
  40.     Search -q /'/* "'≈'","'≈'" */'/ ::runtime:globals.h >>predef.ml
  41.     Find • predef.ml
  42.     Replace -c ∞ /≈'/* "'(≈)®1'","'(≈)®2'" */'/ '{qual="®1"; id="®2"};' predef.ml
  43.     Clear \;\ predef.ml
  44.     Echo '];;'∂n'let predef_exn = [' >>predef.ml
  45.     Search -q /'/* "'≈'","'≈'",'[0-9]+' */'/ ::runtime:fail.h >>predef.ml
  46.     Find • predef.ml
  47.     Replace -c ∞ /≈'/* "'(≈)®1'","'(≈)®2'",'([0-9]+)®3' */'/ '({qual="®1"; id="®2"}, ®3);' predef.ml
  48.     Clear \;\ predef.ml
  49.     Echo '];;' >>predef.ml
  50.     Close -y predef.ml
  51.  
  52. .zi ƒ .mli
  53.     {CAMLCOMP} {COMPFLAGS} {Default}.mli
  54.  
  55. .zo ƒ .ml
  56.     {CAMLCOMP} {COMPFLAGS} {Default}.ml
  57.  
  58. .ml ƒ .mlp
  59.     {CPP} {Default}.mlp > {Default}.ml
  60.  
  61. gensrc ƒ {GENSOURCES}
  62.  
  63. depend ƒ {GENSOURCES}
  64.     Duplicate -y Makefile Makefile.BAK
  65.     Open Makefile; Find • Makefile
  66.     Clear /•### DO NOT DELETE THIS LINE∂n/Δ:∞ Makefile
  67.     ::tools:MakeDepend -Caml -I ::compiler: ≈.ml >>Makefile
  68.     Close -y Makefile
  69.  
  70. version.ml ƒ version.mlp ::version.h
  71.  
  72. ### EVERYTHING THAT GOES BEYOND THIS COMMENT IS GENERATED
  73. ### DO NOT DELETE THIS LINE
  74. link.zo ƒ ::compiler:config.zi
  75. link.zo ƒ ::compiler:const.zo
  76. link.zo ƒ ::compiler:emit_phr.zo
  77. link.zo ƒ ::compiler:interntl.zo
  78. link.zo ƒ ::compiler:lambda.zo
  79. link.zo ƒ ::compiler:misc.zo
  80. link.zo ƒ ::compiler:opcodes.zo
  81. link.zo ƒ patch.zo
  82. link.zo ƒ ::compiler:reloc.zo
  83. link.zo ƒ symtable.zo
  84. link.zo ƒ tr_const.zo
  85. main.zo ƒ ::compiler:config.zi
  86. main.zo ƒ ::compiler:interntl.zo
  87. main.zo ƒ link.zo
  88. main.zo ƒ ::compiler:misc.zo
  89. main.zo ƒ readword.zo
  90. main.zo ƒ symtable.zo
  91. main.zo ƒ version.zo
  92. patch.zo ƒ ::compiler:reloc.zo
  93. patch.zo ƒ symtable.zo
  94. predef.zo ƒ ::compiler:const.zo
  95. symtable.zo ƒ ::compiler:const.zo
  96. symtable.zo ƒ ::compiler:interntl.zo
  97. symtable.zo ƒ ::compiler:misc.zo
  98. symtable.zo ƒ predef.zo
  99. symtable.zo ƒ prim_c.zo
  100. tr_const.zo ƒ ::compiler:const.zo
  101. tr_const.zo ƒ symtable.zo
  102. version.zo ƒ ::compiler:interntl.zo
  103.